#ifndef V_NAV_MODEL_LOADER_H
#define V_NAV_MODEL_LOADER_H

#include <Windows.h>
#include <gl\GL.h>
#include <string>
#include <vector>
#include <map>
#include "definitions/VNTypeDefs.h"
#include "implementations/model3d/Model3DDefs.h"
#include "implementations/model3d/Model3D.h"
#include "implementations/geometry/Triangle.h"

namespace vnav
{
	namespace model3d
	{
		class ModelLoader
		{
		public:
			static vnav::model3d::Model3D* loadModelFromFile(VNString& fileName);
		protected:
		private:
			static void extractMaterials(std::vector<VNString>& lines, vnav::model3d::Model3D& model, VNString& filePath);
			static void processMaterials(vnav::model3d::Model3D& model, VNString& fileName, VNString& filePath);
			static VNBool startsWith(VNString starter, VNString& text);
			static vnav::model3d::FaceType getMeshType(VNString& str);
			static VNUInt loadTexture(const char * fileName);
			ModelLoader();
			~ModelLoader();
		};
	}
}

#endif